package com.sgcc.system.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.sgcc.system.api.domain.SysDistrict;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sgcc.system.mapper.SysDistrictMapper;
import com.sgcc.system.service.ISysDistrictService;

/**
 * SysDistrictService业务层处理
 * 
 * @author sgcc
 * @date 2021-03-22
 */
@Service
public class SysDistrictServiceImpl implements ISysDistrictService 
{
    @Autowired
    private SysDistrictMapper sysDistrictMapper;

    /**
     * 查询SysDistrict
     * 
     * @param districtId SysDistrictID
     * @return SysDistrict
     */
    @Override
    public SysDistrict selectSysDistrictById(String districtId)
    {
        return sysDistrictMapper.selectSysDistrictById(districtId);
    }

    /**
     * 查询SysDistrict列表
     * 
     * @param sysDistrict SysDistrict
     * @return SysDistrict
     */
    @Override
    public List<SysDistrict> selectSysDistrictList(SysDistrict sysDistrict)
    {
        return sysDistrictMapper.selectSysDistrictList(sysDistrict);
    }

    /**
     * 新增SysDistrict
     * 
     * @param sysDistrict SysDistrict
     * @return 结果
     */
    @Override
    public int insertSysDistrict(SysDistrict sysDistrict)
    {
        return sysDistrictMapper.insertSysDistrict(sysDistrict);
    }

    /**
     * 修改SysDistrict
     * 
     * @param sysDistrict SysDistrict
     * @return 结果
     */
    @Override
    public int updateSysDistrict(SysDistrict sysDistrict)
    {
        return sysDistrictMapper.updateSysDistrict(sysDistrict);
    }

    /**
     * 批量删除SysDistrict
     * 
     * @param districtIds 需要删除的SysDistrictID
     * @return 结果
     */
    @Override
    public int deleteSysDistrictByIds(String[] districtIds)
    {
        return sysDistrictMapper.deleteSysDistrictByIds(districtIds);
    }

    /**
     * 删除SysDistrict信息
     * 
     * @param districtId SysDistrictID
     * @return 结果
     */
    @Override
    public int deleteSysDistrictById(String districtId)
    {
        return sysDistrictMapper.deleteSysDistrictById(districtId);
    }

    @Override
    public List<SysDistrict> getDistrictByOrgId(SysDistrict sysDistrict) {
        List<SysDistrict> sysDistrictList = sysDistrictMapper.getDistrictByOrgId(sysDistrict);
        return sysDistrictList;
    }

    @Override
    public SysDistrict getOrgNO(String orgId) {
        return sysDistrictMapper.getOrgNO(orgId);
    }

    @Override
    public SysDistrict getOrgNOByDistrictId(String districtId) {
        return sysDistrictMapper.selectSysDistrictById(districtId);
    }

	@Override
	public SysDistrict findOrgId(SysDistrict sysDistrict) {
		// TODO Auto-generated method stub
		return sysDistrictMapper.findOrgId(sysDistrict);
	}
}
